/*
Copyright (c) 2009 Fred Nicollson, All Rights Reserved.

This file is part of mclife.

mclife is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

mclife is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with mclife.  If not, see <http://www.gnu.org/licenses/>.
*/

package life.model;

import java.awt.Color;

/**
 *
 * @author mcfedr
 */
public class Cell {

    boolean alive;
    int color;

    public Cell(boolean a, int c) {
        alive = a;
        color = c;
    }

	public Cell(boolean a, Color c) {
		this(a, c.getRGB());
	}

    public boolean isAlive() {
        return alive;
    }

    public void setAlive(boolean a) {
        alive = a;
    }

    public Color getColor() {
        return new Color(color, true);
    }

	public int getRGB() {
		return color;
	}

    public void setColor(Color c) {
        color = c.getRGB();
    }

	public void setRGB(int c) {
		color = c;
	}

}
